$(document).ready(function () {
    $.ajax({
        type: "POST",
        url: "../login/whetherLogin",
        success:function (data) {
            if(data==""){
                window.location.href= "/msgtable/html/login.html";
                alert("请登录")
            }else {
                $("#levelofuser").val(data);
                // alert(data)
            }
        },
        error:function (data) {
            window.location.href= "/msgtable/html/login.html";
            alert("请登录")
        }
    });


    $("#loginout").click(function () {
        $.ajax({
            type: "POST",
            url: "../login/loginout",
            success:function (data) {
                window.location.href= "/msgtable/html/login.html"
            },
            error:function (data) {
                window.location.href= "/msgtable/html/login.html"
            }
        });
    })





});